﻿Imports System.ServiceModel
Imports System.IO
Imports System.ServiceModel.Web
Imports System.ServiceModel.Syndication

' 注意: 如果更改此处的类名 "IPictureService"，也必须更新 App.config 中对 "IPictureService" 的引用。
<ServiceContract()> _
Public Interface IPictureService

    ''' <summary>
    ''' Displays the service documentation
    '''</summary>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetDocumentation)> _
     Function GetDocumentation() As Stream


    ''' <summary>
    ''' Returns the specified picture
    ''' </summary>
    ''' <param name="pictureId">The picture Id</param>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetPicture)> _
    Function GetPicture(ByVal pictureId As String) As Stream

    ''' <summary>
    ''' Returns the specified picture thumbnail
    ''' </summary>
    ''' <param name="pictureId">The picture Id</param>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetPictureThumbnail)> _
    Function GetPictureThumbnail(ByVal pictureId As String) As Stream

    ''' <summary>
    ''' Returns a pictures feed in Atom
    ''' </summary>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetPicturesAsAtom)> _
    Function GetPicturesAsAtom() As Atom10FeedFormatter

    ''' <summary>
    ''' Returns a pictures feed in RSS
    ''' </summary>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetPicturesAsRss)> _
   Function GetPicturesAsRss() As Rss20FeedFormatter

    ''' <summary>
    ''' Returns a pictures feed in the default format
    ''' </summary>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetPicturesInDefaultFormat)> _
    <ServiceKnownType(GetType(Atom10FeedFormatter))> _
    <ServiceKnownType(GetType(Rss20FeedFormatter))> _
    Function GetPicturesInDefaultFormat() As SyndicationFeedFormatter

    ''' <summary>
    ''' Returns a pictures feed with Simple List Extensions
    ''' </summary>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetPicturesListAsRss)> _
    <ServiceKnownType(GetType(Atom10FeedFormatter))> _
    <ServiceKnownType(GetType(Rss20FeedFormatter))> _
    Function GetPicturesListAsRss() As SyndicationFeedFormatter

    ''' <summary>
    ''' Returns a pictures feed filtered by tag in Atom
    ''' </summary>
    ''' <param name="tagName">The tag keyword</param>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetPicturesByTagAsAtom)> _
   Function GetPicturesByTagAsAtom(ByVal tagName As String) As Atom10FeedFormatter


    ''' <summary>
    ''' Returns a pictures feed filtered by tag in RSS
    ''' </summary>
    ''' <param name="tagName">The tag keyword</param>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetPicturesByTagAsRss)> _
    Function GetPicturesByTagAsRss(ByVal tagName As String) As Rss20FeedFormatter


    ''' <summary>
    ''' Returns a pictures feed filtered by tag in the default format
    ''' </summary>
    ''' <param name="tagName">The tag keyword</param>
    <OperationContract()> _
    <WebGet(UriTemplate:=ServiceUris.GetPicturesByTagInDefaultFormat)> _
    <ServiceKnownType(GetType(Atom10FeedFormatter))> _
    <ServiceKnownType(GetType(Rss20FeedFormatter))> _
   Function GetPicturesByTagInDefaultFormat(ByVal tagName As String) As SyndicationFeedFormatter


End Interface
